<include file="Public/min-header" />
<div class="wrapper">
	<include file="Public/breadcrumb"/>
	<section class="content">
		<?php
		header("Content-type: text/html; charset=utf-8"); 
	?>
		<div class="row">
			<div class="col-xs-12">
				<div class="box">
					<div class="box-header">
						<nav class="navbar navbar-default">
							<div class="collapse navbar-collapse">
								<!--<form class="navbar-form form-inline" action="{:U('Article/jj_park')}" method="post" name="uploadForm" id="uploadForm" enctype="multipart/form-data">
									<div class="form-group">
										<label class="control-label">添加杰匠园区图片 </label>
										<div class="">
											<input type="file" name="banner" />
										</div>
									</div>

									<div class="form-group pull-right">-->
										<!--<a href="{:U('Admin/Article/article')}" class="btn btn-primary pull-right"><i class="fa fa-plus"></i>添加文章</a>-->

										<!--<input type="submit" id="fileSubmit" name="Submit" value="确认上传" class="btn btn-primary pull-right" />

									</div>
									<div class="form-group pull-right">
										企业文化: <input type="text" name="fname" />
										文化介绍  <textarea name="DIVCSS5" cols="40" rows="1"> 
       
    </textarea>  

											</textarea>
										
									</div>
								</form>-->
								<div class="navbar-form form-inline">
				     
						            <div class="form-group pull-right">
						            	
							            <a href="{:U('Admin/Article/add_jjParck')}" class="btn btn-primary pull-right"><i class="fa fa-plus"></i>添加内容</a>
						            </div>
						            
				          		</div>
								
							</div>
						</nav>
					</div>
					<!-- /.box-header -->
					<div class="box-body">
						<div class="row">
							<div class="col-sm-12">
								<table id="list-table" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
									<thead>
										<tr role="row">
											
											<th class="sorting text-center" tabindex="0" aria-controls="example1" aria-label="Browser: activate to sort column ascending">id</th>
											<th class="sorting text-center" tabindex="0" aria-controls="example1" aria-label="Browser: activate to sort column ascending">标题</th>
											<th class="sorting text-center" tabindex="0" aria-controls="example1" aria-label="Platform(s): activate to sort column ascending">简介</th>
											<th class="sorting text-center" tabindex="0" aria-controls="example1" aria-label="Platform(s): activate to sort column ascending">图片</th>								
											<th class="sorting text-center" tabindex="0" aria-controls="example1" aria-label="CSS grade: activate to sort column ascending">操作</th>
										</tr>
									</thead>
									<tbody>
										<foreach name="jj_park" item="vo">
											<tr role="row" align="center">
												<td>
													{$vo[id]}
												</td>
												<td>
													{$vo[wenhua]}
												</td>
												<td>
													{$vo[jianjie]}
												</td>
												<td>
													<img width="50" height="50" src="{$vo[img]}" />
												</td>
												<td>
													<a href="{:U('Admin/Article/jj_park_save',array(id =>$vo[id]))}" class="btn btn-primary" href="javascript:void(0)"><i class="fa fa-pencil"></i></a>
													<a name="{$vo[id]}" class="btn btn-danger" href="javascript:void(0)"><i class="fa fa-trash-o"></i></a>
												</td>
												
											</tr>
										</foreach>
									</tbody>
									<tfoot>

									</tfoot>
								</table>
							</div>
						</div>
						<div class="row">
							<div class="col-sm-6 text-left"></div>
							<div class="col-sm-6 text-right">{$page}</div>
						</div>
					</div>
					<!-- /.box-body -->
				</div>
				<!-- /.box -->
			</div>
		</div>
	</section>
</div>
<!--成功提示框-->
<div class="modal fade bs-example-modal-sm" id="myModal_success" tabindex="-1">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-body">
      	  <h4 class="text-center">删除成功</h4>
      </div>
      <div class="modal-footer">
      <a href="http://www.jiejiangpt.com/index.php/Admin/Article/skip_jj_park" type="button" class="btn btn-success btn-block" >确认</a>
      </div>
    </div>
  </div>
</div>
<script>
	$('.btn-danger').each(function(i, v) {
		$(this).on('click', function() {
			var isresult = confirm('确认删除');
			var postData;
			if(isresult) {
				postData = $(this).attr('name');

				$.ajax({
					type: 'post',
					url: 'http://www.jiejiangpt.com/index.php/Admin/Article/jj_park_delete',
					data: {
						'id': postData
					},
					success: function(data) {
						if(data == 1){
						$('#myModal_success').modal('show');
					}
					}
				})

			}
		})
	})
	$('.btn-danger2').each(function(i, v) {
		$(this).on('click', function() {
			var isresult = confirm('确认删除');
			var postData;
			if(isresult) {
				postData = $(this).attr('name');

				$.ajax({
					type: 'post',
					url: 'http://www.jiejiangpt.com/index.php/Admin/Article/help_list_delete',
					data: {
						'id': postData
					},
					success: function(data) {
						console.log(data);
					}
				})

			}
		})
	})
</script>
</body>

</html>